import React from 'react'
import { SearchBar, Grid, Tag, Tabs } from 'antd-mobile'

import swipers from '../../../../assets/img/swiper1.png'
import shop2 from '../../../../assets/img/iconShop2.png'
import './Onlytime.less'
import { withRouter } from 'react-router-dom'
import { imgPre } from '../../../../request/http'
function Onlytime(props) {
  let { onlytime } = props
  // console.log(onlytime);
  return (
    <div>
      {/* 限时秒杀 */}
      <div className='times'>
        <b>限时秒杀</b>
        <span>信任特价商品专区 <i>（限量供应，先到先得）</i></span>
        <div className='timeshop'>
        {
          onlytime.map((item) => {
            return (
              <div className='swiperShop' key={item.id}>
                <img src={imgPre+item.img} alt="" />
                <div className="price">
                  <h4>￥{item.price}</h4>
                  <p>￥{item.market_price}</p>
                  <span> <img src={shop2} alt="" /></span>
                </div>
              </div>
            )
          })
        }
        </div>
      </div>
    </div>
  )
}
export default withRouter(React.memo(Onlytime))
